home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2004 November
/
Chip_2004-11_cd1.bin
/
zkuste
/
dolby
/
download
/
dvdlab
/
DVDlabProRC2b.exe
/
{app}
/
Extras
/
Script
/
Object Blur.talk
< prev
next >
Wrap
Text File
|
2004-03-22
|
2KB
|
56 lines
/* Object Blur 1.0
by Oscar, 11 Dec 2003
To run this: DROP the Script from Assets to the Object in Menu.
Note: because of the bitmap merging, the text will become not-editable after you apply this
*/
// Get the current menu and selected object when you drag and drop script
// Note: if testing from Script editor make sure you have just one menu opened on desktop,
// in such case the MenuGetCurSel will return currently opened menu
menu = MenuGetCurSel()
// VTS menu 1..255, VMG menu 10001..10255
// show the current menu on top of all others
MenuActivate(menu)
object= ObjectGetCurSel(menu)
if (object==0) then
print "No object Selected"
end
endif
//newObject = ObjectCopy(menu,object,menu)
//object = newObject
blur = 50
//get the image buffer from object and store it in buffer 1
ImgGrabObject(1,menu,object) // imgNum = temporary image buffer 1,2 or 3
//remember the current object size and position
x = ObjectGetXPos(menu,object)
y = ObjectGetYPos(menu,object)
nW = ObjectGetWidth(menu,object)
nH = ObjectGetHeight(menu,object)
inflate = blur/3
infHalf = inflate/2
// inflate the image (not object) 30 on each side so the blur has enough space
ImgInflate(1,inflate,inflate)
// blur alpha and rgb
ImgBlurAlpha(1,blur)
ImgBlur(1,blur)
// all objects will be converted to bitmap objects (text will be no more editable)
ImgSetToObject(1,menu,object)
// resize the object itself and shift it so it is centered to original
ObjectSetSize(menu,object,nW+inflate,nH+inflate)
ObjectSetPos(menu,object,x-infHalf,y-infHalf)